package com.example.util;

public enum ErrorCode {
	Success("0","成功"),
	Faile("2","失败"),

	All("-1","默认");
	;
	public String value;
	public String memo;
	ErrorCode(String value, String memo) {
		this.value = value;
		this.memo = memo;
	}
	
	public static ErrorCode getErrorCode(String value){
		ErrorCode[] errorCode=ErrorCode.values();
		for(ErrorCode error:errorCode){
			if(error.value.equals(value)){
				return error;
			}
		}
		return null;
	}

}
